import {get,post,put,del} from '@/utils/request/axios';

/**
 * 分页查询数据字典
 * @param obj
 * @returns {*}
 */
export const pageDictData = (dictType,obj)=>{
  const url = "/leader/sysDictData/listPageDictData/"+dictType;
  return get(url,obj);
}

/**
 * 新增数据字典
 * @param obj
 * @returns {*}
 */
export const addDictData = (obj)=>{
  const url = "/leader/sysDictData";
  return post(url,obj);
}

/**
 * 修改数据字典
 * @param obj
 * @returns {*}
 */
export const updateDictData = (code,obj)=>{
  const url = "/leader/sysDictData/"+code;
  return put(url,obj);
}

/**
 * 修改数据字典状态
 * @param obj
 * @returns {*}
 */
export const deleteDictData = (code)=>{
  const url = "/leader/sysDictData/"+code;
  return del(url);
}

export const getDict = ()=>{
  const url = "/leader/sysDictData/getDict";
  return get(url);
}
